{extend name="../../base/view/common/base" /}
<!-- 主体 -->
{block name="body"}
<form class="layui-form p-4">
	<h3 class="pb-3">Xapply移动推送</h3>
	<table class="layui-table layui-table-form">
		<tr>
			<td class="layui-td-gray-2">AccessID</td>
			<td>
				<input type="hidden" value="{$id}" name="id">
				<input type="text" name="accessid" autocomplete="off" placeholder="请输入AccessID" lay-reqText="请输入AccessID" class="layui-input" value="{$config.accessid|default=''}">
			</td>
			<td class="layui-td-gray-2">SecretKey</td>
			<td>
				<input type="text" name="secretkey" autocomplete="off" placeholder="请输入SecretKey" lay-reqText="请输入SecretKey" class="layui-input" value="{$config.secretkey|default=''}">
			</td>
		</tr>
	</table>
	<div class="pt-4">
		<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">立即提交</button>
		<button type="reset" class="layui-btn layui-btn-primary">重置</button>
	</div>
	<div style="padding:12px 0;word-wrap:break-word">
		<p>点击查看文档：<a href="https://lutui.net/doc/app/tencent-push.html" target="_blank" style="color: #FF7300;">腾讯云移动推送</a></p>
	</div>
</form>
{/block}
<!-- /主体 -->

<!-- 脚本 -->
{block name="script"}
<script>
	const moduleInit = ['tool'];
	function gouguInit() {
		var form = layui.form, tool = layui.tool;
		//监听提交
		form.on('submit(webform)', function (data) {
			let callback = function (e) {
				layer.msg(e.msg);
				if (e.code == 0) {
					tool.sideClose(1000);
				}
			}
			tool.post("/home/conf/edit", data.field, callback);
			return false;
		});
	}
</script>
{/block}
<!-- /脚本 -->